# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=clevis
pkgver=19
pkgrel=0
pkgdesc="Pluggable framework for automated decryption"
url="https://github.com/latchset/clevis"
license="GPL-3.0-or-later WITH OpenSSL-Exception"
arch="all"
depends="bash cryptsetup jose libpwquality"
makedepends="
	asciidoc
	bash-completion-dev
	meson
	tpm2-tools
	cryptsetup-dev
	jansson-dev
	jose-dev
	audit-dev
	udisks2-dev
	luksmeta-dev
	"
checkdepends="jq keyutils tang"
subpackages="
	$pkgname-dbg
	$pkgname-doc
	$pkgname-bash-completion
	"
source="https://github.com/latchset/clevis/archive/v$pkgver/clevis-$pkgver.tar.gz"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
dee19354c908c3843fc295a84b431780d5d6062c77766ee7ce9550636d3623d92b0cd1f6d4c40d57bef14debddc161da2b72289a5d6185cdd17b09a1ef67409a  clevis-19.tar.gz
"
